package com.design.factory;

public abstract class MethodFactory {
    abstract IBean get();

    public static class FactoryA extends MethodFactory {
        @Override
        IBean get() {
            return new IBean.BeanA();
        }
    }

    public static class FactoryB extends MethodFactory {
        @Override
        IBean get() {
            return new IBean.BeanB();
        }
    }
}
